package 天梯;

import java.util.Collections;
import java.util.List;
import java.util.Scanner;

/**
 * @ClassName : Test02
 * @Author : LV88VL
 * @Date: 2021/3/13 15:30
 * @Description : 连念数字
 * 懂的地方：思路清楚，但是不懂怎么通过java的方法实现
 *  不懂的地方
 *                  1.。怎么将获取的数字转换为字符串
 *                  2.。怎么获取指定位置的字符
 *
 *   解决：
 *          1.。怎么将获取的数字转换为字符串：
 *          运用String类中的valueOf方法将int类数组转换为String类的数组
 *          2.。怎么获取指定位置的字符
 *          通过charAt方法
 */
public class Test02 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int i=0;
        String str = String.valueOf(a);
        String [] array = new String[]{"ling","yi","er","san","si","wu","liu","qi","ba","jiu","fu"};
        for(;i<str.length()-1;i++){
            char c=str.charAt(i);
            if(c=='-'){
                System.out.print(array[10]+" ");
            }else if(c=='0'){
                System.out.print(array[0]+" ");
            }else if(c=='1'){
                System.out.print(array[1]+" ");
            }else if(c=='2'){
                System.out.print(array[2]+" ");
            }else if(c=='3'){
                System.out.print(array[3]+" ");
            }else if(c=='4'){
                System.out.print(array[4]+" ");
            }else if(c=='5'){
                System.out.print(array[5]+" ");
            }else if(c=='6'){
                System.out.print(array[6]+" ");
            }else if(c=='7'){
                System.out.print(array[7]+" ");
            }else if(c=='8'){
                System.out.print(array[8]+" ");
            }else if(c=='9'){
                System.out.print(array[9]+" ");
            }
        }
        if(i==str.length()-1){
            char c=str.charAt(i);
            if(c=='-'){
                System.out.print(array[10]);
            }else if(c=='0'){
                System.out.print(array[0]);
            }
            else if (c=='1'){
                System.out.print(array[1]);
            }else if(c=='2'){
                System.out.print(array[2]);
            }else if(c=='3'){
                System.out.print(array[3]);
            }else if(c=='4'){
                System.out.print(array[4]);
            }else if(c=='5'){
                System.out.print(array[5]);
            }else if(c=='6'){
                System.out.print(array[6]);
            }else if(c=='7'){
                System.out.print(array[7]);
            }else if(c=='8'){
                System.out.print(array[8]);
            }else if(c=='9'){
                System.out.print(array[9]);
            }
        }
    }
}
